GBML manual / Rooms

room_current

Which room is active right now.

Syntax

room_current() -> room

Returns

room

Description

Which room is active right now. Mostly useful for comparing against a named room (room_current() == room_doc_arena) to branch on where the calling instance actually is, or for round-tripping through room_change the way room_restart does internally.

Example

var here = room_current();

Reads the active room into a local variable - typically to compare against a specific room by name later in the same event, or to log/save which room the player was last in.